
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BusinessObject;
using DataAccessLayer;

namespace BusinessLogic
{
    /// <summary>
    /// Define HinhAnhMatHangUtil class. This class user for BussinessLayer.

    /// </summary>
    public class HinhAnhMatHangUtil
    {
        /// <summary>
        /// Define function Insert for HinhAnhMatHang Object.
        /// </summary>
        /// <param name="t">object data need Insert.</param>
        /// <returns>
        ///    True: if insert successfull.
        ///    False: if insert error.
        ///</returns>
        public static bool Insert(HinhAnhMatHang t)
        {

            return HinhAnhMatHangDao.Insert(t);
        }
        /// <summary>
        /// Define function Update for HinhAnhMatHang Object.
        /// </summary>
        /// <param name="t">project data need updated.</param>
        /// <returns>
        ///    True: if update successful.
        ///    False: if update Error.
        ///</returns>
        public static bool Update(HinhAnhMatHang t)
        {

            return HinhAnhMatHangDao.Update(t);
        }
        /// <summary>
        /// Get All HinhAnhMatHang object from table HinhAnhMatHang.
        /// </summary>
        /// <returns>List HinhAnhMatHang object.</returns>
        public static List<HinhAnhMatHangResult> GetAll()
        {
            return HinhAnhMatHangDao.GetAll();
        }
        /// <summary>
        /// Search HinhAnhMatHang object in table HinhAnhMatHang.
        /// </summary>
        /// <param name="t">Condition for Search.</param>

        /// <returns>List HinhAnhMatHangResult objects.</returns>

        public static List<HinhAnhMatHangResult> SearchHinhAnhMatHangSomeCondition(HinhAnhMatHang t)
        {
            return HinhAnhMatHangDao.SearchHinhAnhMatHangSomeCondition(t);
        }
        /// <summary>
        /// Get a HinhAnhMatHang data object by primary key. 
        /// </summary>
        /// <param name="id" >This is primary key.</param>
        /// <returns>A HinhAnhMatHang object.</returns>

        public static HinhAnhMatHang Get(int id)
        {
            return HinhAnhMatHangDao.Get(id);
        }
        /// <summary>
        /// This function to Delete HinhAnhMatHang object by primary key.
        /// </summary>
        /// <param name="id" >This is primary key.</param>
        /// <returns>If succesful return True else  return False.</returns>

        public static bool Delete(int id)
        {

            return HinhAnhMatHangDao.Delete(id);
        }
        public static List<HinhAnhMatHangResult> GetAllByMatHang(string maMH)
        {
            return HinhAnhMatHangDao.GetAllByMatHang(maMH);
        }
    }
}